package tech.aistar.day05;

/**
 * 本类用来演示:
 *
 * @author: success
 * @date: 2022/7/22 9:48 上午
 */
public class Cat extends Animal {

    public double meng;

    public Cat() {
    }

    public Cat(String name, int age, double meng) {
        super(name, age);
        this.meng = meng;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("Cat{");
        sb.append("meng=").append(meng);
        sb.append('}');
        return super.toString()+sb.toString();
    }

    @Override
    public void spark() {
        System.out.println("喵喵~~~");
    }

    public void catchMouse(){
        System.out.println("抓老鼠...");
    }

    @Override
    public Animal test() throws ArrayIndexOutOfBoundsException {
        return null;
    }

    public static void testStatic(){
        System.out.println("Cat中的static...");
    }
}
